Documentation Groups
The groups array holds group objects which hold configurations for a documentation group
groupTitle
– {string}
–
The name of group. Appears in the UI for tabs etc...
groupId
– {string}
–
The unique id of the group. Visible in the url for this documentation group
groupIcon
– {string}
–
The class used in rendering icons for this group. See the icon options you have at Font Awesome. The default is "icon-book".
showSource
– {boolean}
–
Defaults to false. When true will copy all source files to the webapp so they can be displayed in the UI. WARNING All files within this group should be considered public. All information should be considered insecure. Note, you can set the 'showSource' configuration at the section level to override the group level setting.
sections
– {array}
–
Holds section objects which contain configurations that point Docular to docs that need to be parsed. Sections are seen as dropdown items within a group tab. Sections are meant to provide a logical way to partition your documentation and apis. In the case of both Docular and AngularJS, sections provides ways to separate actual API information from "overview" and "tutorial" like documentation. It defaults to an empty array which results in no creation of groups.
This website (grunt-docular.com) has the groups
configuration set to an empty array. This is because there is no additional documentation necessary to generate for the "grunt-docular.com" site. Since the group configurations are built into Docular, we can just switch them on using the showDocularDocs
flag which adds the Docular group into the mix at run time.
This is what it would look like if we were to manually add the Docular documetation group configuration:
module.exports = function(grunt) { // Project configuration grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), docular: { groups: [ { groupTitle: 'Docular', groupId: 'docular', groupIcon: 'icon-beer', showSource: true, sections: [ //section objects ommitted here ] } ], //other configurations ommitted here for simplicity } }); // Load the plugin that provides the "docular" tasks. grunt.loadNpmTasks('grunt-docular'); // Default task(s). grunt.registerTask('default', ['docular']); };